import log4js from "log4js"
import type { Logger } from "log4js"

import { nowDate } from "./dayjs"

const fileName: string = nowDate + "-compeqapi.log"

log4js.configure({
  appenders: { compeqapi: { type: "file", filename: "../compeqapi-logs/" + fileName } },
  categories: { default: { appenders: ["compeqapi"], level: "trace" } },
})

const logger: Logger = log4js.getLogger("compeqapi")


export default logger
